package com.fruit.web.vo.genl;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ApplicationScoped;
import javax.faces.model.SelectItem;
import com.fruit.utils.MessageFactory;
import com.fruit.web.constant.EjdConstants;

@ManagedBean(name="existShowOn")
@ApplicationScoped
public class ExistShowOnBean implements java.io.Serializable {

	
	private static final long serialVersionUID = 5054087821033164818L;
	private SelectItem[] showOnItems;

	public SelectItem[] getShowOnItems() {
		return showOnItems;
	}

	public void setShowOnItems(SelectItem[] showOnItems) {
		this.showOnItems = showOnItems;
	}

	public ExistShowOnBean() {
		
		SelectItem[] tempShowOnItems = new SelectItem[3];
		//set select default 
		
		String promotionN18 = MessageFactory.getMessage(EjdConstants.USER_BUNDLE_NAME,"show.on.promotion.display", FacesMessage.SEVERITY_ERROR).getDetail();
		tempShowOnItems[0] = new SelectItem("P",promotionN18);
		String hotN18 = MessageFactory.getMessage(EjdConstants.USER_BUNDLE_NAME,"show.on.hot.display", FacesMessage.SEVERITY_ERROR).getDetail();
		tempShowOnItems[1] = new SelectItem("H",hotN18);
		String recommendN18 = MessageFactory.getMessage(EjdConstants.USER_BUNDLE_NAME,"show.on.recommend.display", FacesMessage.SEVERITY_ERROR).getDetail();
		tempShowOnItems[2] = new SelectItem("R",recommendN18);
		this.setShowOnItems(tempShowOnItems);
	}
}
